<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * @author for ForestDale: Joseph Chang, last modified: 4/9/14
 */

class Day {
 private $id; // "mm-dd-yy" form of this date: used as a key
 private $month; // Textual month of the year (e.g., Jan)
 private $day; // Textual day of the week (Mon - Sun)
 private $dom; // Numerical day of month
 private $month_num; // Numberical month
 private $day_of_week; // Numerical day of the week (1-7, Mon = 1)
 private $day_of_year; // Numerical day of the year (1-366)
 private $year; // Numerical year (e.g., 2008)
 private $shifts; // array of Shifts

 
function __construct($i,$m,$d,$dom,$mn, $dow, $doy, $y, $s){
   $this->id =$i;
   $this->month = $d;
   $this->day = $d;
   $this->dom = $dom;
   $this->month_num = $mn;
   $this->day_of_week = $dow;
   $this->day_of_year = $doy;
   $this->year = $y;
   $this->shifts = $s;  // associative array of shifts. The keys are the shift ids
}

/*
 * getter functions
 */
    function get_id() {
        return $this->id;
    }
    function get_month() {
        return $this->month;
    }
    function get_day() {
        return $this->day;
    }
    function get_dom() {
        return $this->dom;
    }
    function get_month_num() {
        return $this->month_num;
    }
    function get_day_of_week() {
        return $this->day_of_week;
    }
    function get_day_of_year() {
        return $this->day_of_year;
    }
    function get_year() {
        return $this->year;
    }
    function get_shifts() {
        return $this->shifts;
    }
    
 /*
 * setter functions
 */
    function set_id($id) {
        $this->id = $id;
    }
    function set_month($month) {
        $this->month = $month;
    }
    function set_day($day) {
        $this->day = $day;
    }
    function set_dom($dom) {
        $this->dom = $dom;
    }
    function set_month_num($month_num) {
        $this->month_num = $month_num;
    }
    function set_day_of_week($day_of_week) {
        $this->day_of_week = $day_of_week;
    }
    function set_day_of_year($day_of_year) {
        $this->day_of_year = $day_of_year;
    }
    function set_year($year) {
        $this->year = $year;
    }
    function set_shifts($shifts) {
        $this->shifts = $shifts;
    }
}
?>
